Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPAM Address Support for Bloxone Ansible v2 #55

Open
wants to merge 14 commits into
base: v2
Choose a base branch
from

Conversation

ybhalchim
Copy link

No description provided.

@unasra unasra changed the title ipam_address Support for Bloxone Ansible v2 IPAM Address Support for Bloxone Ansible v2 Dec 17, 2024
@unasra unasra self-requested a review December 17, 2024 05:42
@unasra
Copy link
Collaborator

unasra commented Dec 17, 2024

Missing change logs and deprecation notices for this object .

Earlier this module was termed as ipv4_reservation !

state: "present"
register: subnet

- name: Create a Address
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Examples should have only the required tasks. Here , the tasks for creation of parents i.e. Ip Space and Subnet , one task containing the creation of the address with a few relevant fields and another for the deletion of the address should be sufficient. Others can be removed !!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

state: "present"
register: subnet

- name: Create A Address
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this is an example for Info , remove all the create statements here , just keep the get/ info statements .

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -0,0 +1,2 @@
---
dependencies: [setup_address]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dependencies include the setup required used in the main file for the creation of an address , something like ip space or subnet !

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

- name: Get information about the Address by tag
infoblox.bloxone.ipam_address_info:
tag_filters:
region : "eu"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
region : "eu"
location : "site-1"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

- name: Get information about the Address by ID
infoblox.bloxone.ipam_address_info:
id: "{{ address.id }}"
register: address_info
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registering the result of the object is not important as it is not being used anywhere . Hence all the registers can be removed.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

filters: {
address: "10.0.0.6",
space: "{{ _ip_space.id }}",
hwaddr: "00:11:22:33:44:55"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The address can be filtered with just address and space , hwaddr isnt required here !

The same applies for all the subsequent tasks below.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


always:
# Cleanup if the test fails
- name: Delete a Subnet
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing cleanup call for address.

api_key: "{{ api_key }}"
block:
# Basic tests for Address Block
- name: Create A Address
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- name: Create A Address
- name: Create an Address

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

infoblox.bloxone.ipam_address:
address: "10.0.0.3"
space: "{{ _ip_space.id }}"
tags:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create a random tag ,as done in other objects .

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DOne

- address_info.objects | length != 0

always:
# Cleanup if the test fails
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleanup required for address

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants